<template>
	<view class="item row">
		<image class="main_img" :src="item.imgList[0]"></image>
        <view class="main ">
            <view class="title">
               {{item.rent_type?item.rent_type+" | ":""}}{{item.title}}
            </view>
            <view class="info">
                {{item.house_type}}-{{item.address}}
            </view>
            <view class="tag_list row">
                <view class="tag" v-for="(item,index) in item.tags" :key="index">
                    {{item}}
                </view>
            </view>
            <view class="price">{{item.price}}元/月</view>
        </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				StatusBar: this.StatusBar,
				CustomBar: this.CustomBar
			};
		},
		name: 'cu-custom',
		computed: {
			style() {
				var StatusBar= this.StatusBar;
				var CustomBar= this.CustomBar;
				var bgImage = this.bgImage;
				var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`;
				if (this.bgImage) {
					style = `${style}background-image:url(${bgImage});`;
				}
				return style
			}
		},
		props: {
			item: {
				type: Object,
				default:{
                    title:"合租|风城一路，XX小区5人合租立即看房瘦成闪电是成都市城市到处是大城市到处才是大城市到处都是城市雕塑",
                    imgList:[
                        "/static/images/house.jpg"
                    ],
                    house_type:"两室一厅",
                    address:"西安市未央区龙首商业街，二府庄新区",
                    tags:[
                        "精装修","押一付一","在线签约"
                    ],
                    price:"1000"
                }
			},
			isBack: {
				type: [Boolean, String],
				default: false
			},
			bgImage: {
				type: String,
				default: ''
			},
		},
		methods: {
			BackPage() {
				uni.navigateBack({
					delta: 1
				});
			}
		}
	}
</script>

<style lang="scss">
	@import "./house.scss"
</style>
